<?php
class Orthographe_WordCounter_Block_Adminhtml_Renderer_TypeCommande extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
{
	public function render(Varien_Object $row)
	{
		$data = "";
				Mage::log("NPL - ".get_class($this)." - ID Product ! ".$row->getData($this->getColumn()->getIndex()),Zend_Log::DEBUG);
		$strIDCommande = $row->getData($this->getColumn()->getIndex());
		if(!empty($strIDCommande) && $strIDCommande!="-1") {
			
			$product = Mage::getModel('catalog/product')->load($row->getData($this->getColumn()->getIndex()))->getData();
			
			$data = ucfirst($product['name']);
			
		}else {
			$data = $this->__('Not affected');
		}
		return $data;
	}
}